
export default class Controller {
    constructor (CommonService) {
        "ngInject"
        CommonService.request({
            url: '/perm/permission'
        }).then( r => {
            console.log(r.data)
            this.isTreeLoad = true;
            this.treeNode = r.data.menus;
            window.permission = r.data.comps;
        })
    }

    selectNode (scope, node, $event) {
        let $node   = scope.$nodeScope;
        $('.tree-parent').find('.active').removeClass('active')
        $node.$element.addClass('active');
    }
}